home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / scope / 176-200 / scopedisk186 / aplot2d / aplot2d.doc < prev    next >
Text File  |  1995-03-19  |  16KB  |  505 lines

  1. Amiga Plot 2D v 1.0 
  2. (c)copyright 1991
  3.  
  4.  
  5.     Amiga Plot 2D is not in the Public Domain. All rights are 
  6. retained. Amiga Plot 2D is distributed via Shareware. Simply put, 
  7. Shareware means you get to use the fully functional program 
  8. before you buy. If you find Amiga Plot 2D to be useful for your 
  9. needs, or you wish to help further its' developement, then you 
  10. should register your copy of the program. To register send a 
  11. check or money order for $20 to the address given below.
  12.  
  13.  
  14.  
  15.  
  16.  
  17. Joe Martin
  18. 2702 Willow Grove Lane
  19. Ft. Walton Bch. FL 32547
  20.  
  21. 904-862-7108(voice)
  22.  
  23.  
  24.     Amiga Plot 2D is in its' infancy. I am releasing this 
  25. version at this time because the program will grow and mature 
  26. only through user input. It is my intention to include every 
  27. reasonable request to registered users. Suggestions will be 
  28. considered however, from anyone interested enough to write me a 
  29. letter. I am a high school math teacher and enjoy computer 
  30. programming on the side. I intended Amiga Plot 2D to be an aid to 
  31. my students in AlgebraI and above, but it can be applied to any 
  32. graphing math need. The data plotting side of Amiga Plot 2D came 
  33. into being because of all the interest I am seeing for other data 
  34. plotters. Most graphing and data plotting programs seem to fall 
  35. short in a very important area, and that is in the user 
  36. interface. If we are to foster the exploration of mathematics in 
  37. our young people then we should provide a useful tool for that 
  38. purpose. A tool that stimulates rather and alienates the user. 
  39. This is my ultimate goal in the Amiga Plot series. If you have 
  40. not already done so, check out Amiga Plot 3D on your local BBS.
  41.  
  42.  
  43.     I can be reached via modem on any one of the following 
  44. BBS's.
  45.  
  46. People Link        The Hobbit Hole        The Amiga Advantage
  47. c/o OSS199        904-243-6219        904-863-8697
  48.                 c/o Joe Martin        c/o Joe Martin
  49.  
  50.  
  51.  
  52. Introduction
  53.  
  54.     Amiga Plot 2D is a graphing and plotting program for any 
  55. function or data set that can be described in two dimensions, 
  56. (x,y). It provides for 4 functions or data sets on screen at one 
  57. time and can mix the two. All parameters are provided in user 
  58. gadgets or menu items. These parameters can be saved and loaded 
  59. to provide the convienence of groups of related data/functions. A 
  60. flexible parser is provided so that mathematical functions can be 
  61. explored and graphed while declaring user variables and using 
  62. built in constants. The plotting grid can be defined in user 
  63. adjustable increments or by the 'auto tics' feature. Text can be 
  64. altered and placed anywhere on the grid as well as axis labels 
  65. and titles for each plot configuration. User input is both 
  66. requested and expected as to future enhancements to Amiga Plot 
  67. 2D.
  68.  
  69.  
  70.  
  71.     Amiga Plot 2D runs under Amiga Dos 1.2, 1.3 or 2.0, and 
  72. requires  an Amiga 500, 1000, 2000, or 3000 with 1 meg memory. 
  73.  
  74.  
  75.  
  76. Starting APlot
  77.  
  78.     Workbench:    double click on the AP2 icon
  79.  
  80.     Set stack to at least 10000 bytes if starting from the CLI.
  81.  
  82.     CLI:    type 'cd <your aplot dir>' <ret>
  83.             type 'run ap2' <ret>
  84.  
  85.     
  86.  
  87.     
  88.  
  89.  
  90.  
  91.  
  92.  
  93. Files & Directories
  94.  
  95.  
  96.  
  97.     Aplot expects certain directories to be present in your main 
  98. aplot directory. 
  99.  
  100.     
  101.  
  102.     AParms2D/    for all parameter files. The file 
  103.                 'Default.parms' is loaded at run time.
  104.  
  105.     Data/        for data files
  106.     Pics/        for IFF screen files saved from aplot.
  107.  
  108.     PenColors    this is a text file that contains a pen color 
  109.                 table
  110.  
  111.  
  112.     Default.parms    a file of default functions or data sets to 
  113.         automatically loaded on startup.
  114.  
  115.  
  116. Main Screen
  117.  
  118.     Aplot 2D uses a hires/interlaced 8 color screen. Aplot will 
  119. adapt to overscan sized screens via Workbench 2.0 or morerows. 
  120.     The screen is divided into a wide top and side border where 
  121. the most used features are accessed through gadgets. Some of the 
  122. gadgets like 'Plot', 'Stop', 'Clear' and others in the left 
  123. border are buttons or toggles. Along the top and upper left are 
  124. the entry gadgets.
  125.  
  126.      The plotting area contains the grid markings, axes and 
  127. labels.
  128.  
  129.  
  130. Minimum/Maximum
  131.  
  132.     At the very top of the aplot screen are 4 long entry gadgets 
  133. that determine the plotting dimensions. To change a value, click 
  134. in any one of the gadgets. Pressing <ret> will toggle through all 
  135. 4 of these gadgets over and over. To terminate this function, 
  136. press <esc> and the grid will auto adjust to the new dimensions.
  137.  
  138.  
  139. Function/Data Entry
  140.  
  141.     Below the Min/Max gadgets are the function entry gadgets. 
  142. Before I describe the rules for the parser, let's think about the 
  143. functionality of the gadgets. First, know that each function 
  144. gadget has an adjacent toggle gadget that determines whether that 
  145. particular function or data set will be plotted. The toggle 
  146. gadget has other functions which will be discussed later. To 
  147. recap, when the 'Plot' gadget is selected, each function/data set 
  148. whose adjacent function gadget is active will be plotted in turn 
  149. to the plotting grid.
  150.  
  151.     Data can be loaded via the 'Files' menu into each of the 4 
  152. function/data sets. When the 'load data' menu item is selected 
  153. and a data file chosen, the data will be loaded into the first 
  154. function/data set whose funtion gadget is selected. Make sure, 
  155. when loading data, that only the one toggle gadget is active for 
  156. the chosen data set. Example, if you wish to load a data set into 
  157. function/data area named 'i(x)', then only that toggle gadget 
  158. should be in its' selected state. If more than one toggle gadget 
  159. is selected, then the data will be loaded into the first data 
  160. area. Data areas are ordered; f(x), g(x), h(x) and i(x).
  161.  
  162.  
  163. Mathematical Parser Conventions
  164.  
  165.     To edit or add a mathematical function to Aplot 2D, select 
  166. one of the 4 entry gadgets by clicking the left mouse button 
  167. inside the entry gadget. Functions may be entered in upper or 
  168. lower case, although all will be converted to lower case when 
  169. parsed. 
  170.  
  171. Syntax Rules:
  172.  
  173. 1- Space may be used for readability where appropriate.
  174.  
  175. 2- Up to 12 variables or functions can be specified, using 
  176. commas to separate.
  177.  
  178. 3- Function(variable) names can be up to 11 characters in 
  179. length, followed by '=' then a mathematical expression.
  180.  
  181. 4- A numerical constant may proceed a variable or paren. to 
  182. indicate multiplication. Ex. '2x' means '2 * x'.
  183.  
  184. 5- Any function declaration may include any 
  185. variable/function previously declared. Parsing order is 
  186. f(x), g(x), h(x), and i(x), with each being parsed left to 
  187. right.
  188.  
  189. 6- The last function/variable declared in each of the 4 
  190. function gadgets will the one plotted when its' toggle 
  191. gadget is in the selected state.
  192.  
  193. Here is an Example for study and explanation:
  194.  
  195.     a=x^2, b=sin(a), f(x)=3sin(0.1(a+b))-2cos(0.2(a-b))
  196.  
  197.     'a' is a variable declaration/assignment a=x^2.
  198.     'b' is a variable declaration/assignment b=sin(a), 'b' uses 'a'.
  199.     'f(x)' is the function that will be plotted and uses both 'a' and 
  200.             'b'.
  201.  
  202.     In the above example the 'f(x)' is optional, also notice 
  203. '3sin(x)' which is equivalent to '3 * sin(x)'.
  204.  
  205. Operation :     +,-,*,/ division by zero is trapped
  206.                 ^ to the power of
  207.  
  208. grouping     :    ()
  209.  
  210. functions :    abs()     absolute value of
  211.             sqrt()     square root of
  212.             sqr()    square of
  213.             sin()    sin of
  214.             asin()    arc sin of
  215.             cos()    cosine of
  216.             acos()    arc cosine of
  217.             tan()    tangent of
  218.             cot()    cotangent of
  219.             atan()    arc tangent of
  220.             ln()    natural logarithm of
  221.             log()    base 10 log of
  222.             exp()    exponential of
  223.  
  224. Constants:    pi = 3.1415926535
  225.              e = 2.7182818284
  226.  
  227.  
  228.  
  229. Resolution
  230.  
  231.     The screen entry gadget 'Res' indicates how many units to 
  232. resolve between each tic mark on the plotting grid. This is only 
  233. useful when plotting math functions and does not apply when 
  234. plotting data sets. For example if you graph a function with many 
  235. peaks and valleys you may have a coarse looking plot with jagged 
  236. edges when connected by lines. Increase the Res factor to smooth 
  237. the plot. High Res values increase plotting time greatly. Again, 
  238. Res determines how many times per tic mark to sample the given 
  239. function values.
  240.  
  241.  
  242. Zooming
  243.  
  244.     'XZm' and 'YZm' determine the zoom factors in each 
  245. dimension. 'ZoomIn' and ZoomOut' do the actual zooming of the 
  246. grid area. 
  247.  
  248.     To zoom in on any one particular area of the graph, select 
  249. the 'ZoomIn' gadget. Next place the mouse pointer over the center 
  250. of the part you want to zoom in on. Click the left mouse button 
  251. to perform the zoom. 'ZoomOut' works the same as 'ZoomIn'.
  252.  
  253.  
  254. Tic Marks
  255.  
  256.     The entry gadget titled 'Tics' involves tic mark spacing on 
  257. the grid. This has to do with the number of tics(divisions) 
  258. between the minimums and maximums for each axis. This gadget is 
  259. affected by the menu toggle 'Display/Tic Marks'. If the menu 
  260. toggle is set to 'Absolute Tics' and if the 'Tics' gadget is set 
  261. to 15 tics per axis, then exactly 15 divisions will be created 
  262. between the minimum and maximum of each axis. These divisions 
  263. will be rather hard to view since they may be in odd increments 
  264. of say, for example, 0.12738 units. A more readable way of 
  265. determining tic spacing is by choosing 'Auto Tics' from the 
  266. display menu. With 'Auto Tics' the 'Tics' entry gadget only 
  267. determines the maximum number of tic marks and the actual number 
  268. will usually be less than maximum. 'Auto Tics' will force the tic 
  269. mark to the closest factor of 0.2, 0.25, 0.5, or 1.0. If this 
  270. scale does not apply to your grid span, then a power of ten 
  271. factor is applied to the tic scale. 
  272.  
  273. Ex.     Xmin=-15 Xmax=15 -> span=30 units
  274.         if Tics=10 then  tic increment = 30/10 -> or 3
  275.  
  276.     if 'Absolute Tics' then there will be 10 tic divisions of 3 
  277.     unit increments( -15 -12 -9 -6 etc. ).
  278.  
  279.     if 'Auto Tics' then there will be 6 tic divisions of 5 unit increments
  280.     each.
  281.  
  282.  
  283.  
  284. Center
  285.  
  286.     This gadget allows you to change any current area of the 
  287. grid to center. This is useful when you need to slide the grid in 
  288. one or both dimensions. To use, select 'Center' then place mouse 
  289. pointer over the new center and click the left mouse button.
  290.  
  291.  
  292. Default
  293.  
  294.     This button simply changes back to a default function 
  295. plotting grid whose dimensions are -10 to 10 units. This is used 
  296. by most math texts as a reference coordinate system.
  297.  
  298.  
  299. PickVal
  300.  
  301.     Useful for a quick and dirty estimation of a screen points 
  302. values. When selected you place the cross hair over the point you 
  303. are interested in and click the left mouse button. The values are 
  304. printed to the screen. Remember, these values are accurate only 
  305. to approximately 1/10 of a tic mark(if there are 10 pixels 
  306. between each tic mark).
  307.  
  308.  
  309. Find Y
  310.  
  311.     When selected a small window appears. You may enter an 'x' 
  312. value for the selected function. Then the function(y) value will 
  313. be given. This is an accurate way to find functional values. If a 
  314. data set is highlighted when this gadget is called nothing will 
  315. happen since data sets are not parsed.
  316.  
  317.  
  318. Plot
  319.  
  320.     Starts parsing and plotting of all selected function/data 
  321. sets. 
  322.  
  323.  
  324. Stop
  325.  
  326.     Stops the current function plot. If more than one function 
  327. is qued, each will need to be stopped in turn.
  328.  
  329.  
  330. Clear
  331.  
  332.     Clears and updates the plot screen and grid.
  333.  
  334.  
  335. Line/Point
  336.  
  337.     Determines current plotting mode. Lines will connect the 
  338. data points if selected.
  339.  
  340.  
  341.  
  342. MENU FUNCTIONS
  343.  
  344.  
  345.  
  346. File/ Load Parms
  347.  
  348.     After selecting this menu item, a file requestor will be 
  349. displayed showing the 'AParms2D' directory listing. Select a 
  350. parameter file for loading. Parameter files contain all 
  351. information pertinent to a particular function/data environment. 
  352. Such info as function definitions or data file names as well as 
  353. all plotting parameters are a part of the parm file.
  354.  
  355.  
  356. File/ Save Parms
  357.  
  358.     Displays a file requestor for selecting parameter file names 
  359. prior to the actual save. You may click on available file names 
  360. or  type a new name in the 'File' gadget. Click the left mouse 
  361. button when the pointer is over the 'OK' gadget to save file.
  362.  
  363.  
  364. File/ Load Data
  365.  
  366.     A requestor will allow the selection of a data file name 
  367. from the 'Data' directtory. The actual data will be loaded into 
  368. the first highlighted function box. 
  369.  
  370.  
  371. File/ Save Data
  372.  
  373.     A requestor will allow the selection of a data file name 
  374. from the 'Data' directory. The file name may be typed into the 
  375. 'File' gadget. Select 'OK' when ready. Data will be saved from 
  376. the first highlighted function gadget. It is a good idea to 
  377. highlight only the one function gadget which you wish to save. 
  378.  
  379.  
  380. File/ Save IFF
  381.  
  382.     A requestor will allow the selection of a file name from the 
  383. 'Pics' directory. The file name may be typed into the 'File' 
  384. gadget. Select 'OK' when ready. The entire screen will be saved 
  385. in the IFF format. This file may be viewed with any viewer or 
  386. paint program.
  387.  
  388.  
  389. File/ Quit
  390.  
  391.     Quit APlot 2D. No data or parameters are saved!
  392.  
  393.  
  394. File/ About
  395.  
  396.     About Amiga Plot 2D.
  397.  
  398.  
  399.  
  400. Data/ Sort Data
  401.  
  402.     Sorts data in ascending order for 'X' or 'Y' depending on 
  403. submenu selection. Once data has been sorted, it can not be 
  404. returned to original order unless the original data file is 
  405. reloaded.
  406.  
  407.  
  408. Data/ ExchangeXY
  409.  
  410.     Places all 'X' data elements in 'Y' and all 'Y' elements in 
  411. 'X'. Call this function a second time to place data in original 
  412. order.
  413.  
  414.  
  415. Display/ Tic Marks
  416.  
  417.     Auto Tics 
  418.  
  419.     This function insures that the tic mark divisions will 
  420.     be in a readable unit of 0.2, 0.25, 0.5 or 1.0, or a power 
  421.     of ten thereof. The minimum and maximum values will also be 
  422.     adjusted as well. The 'Tics' gadget value will act as an 
  423.     upper limit, so the actual number of tics marks will usually 
  424.     be less.
  425.  
  426.     Absolute Tics
  427.  
  428.     This function insures that the number of tic marks will 
  429.     match the 'Tics' gadget exactly. The tic factor may be an 
  430.     odd looking unit such as 0.333 and will not necessarily 
  431.     yield even tic marks between whole units. Note that 'Auto 
  432.     Tics' and 'Absolute Tics' are mutually exclusive.
  433.  
  434.  
  435. Display/ Grid
  436.  
  437.     Two subitems for grid on or grid off.
  438.  
  439.  
  440. Display/ Plot Text
  441.  
  442.     APlot 2D can place up to 8 text items or labels on the 
  443. plotting grid at one time. These items are organized in a 
  444. separate window and can be toggled on or off at any time. Each 
  445. function has a primary label which is the same as its 
  446. mathematical representation. Each function has a secondary text 
  447. label which can be anything you desire. These two text labels can 
  448. be toggled on or off by the 'On/Off' gadgets in the Text window. 
  449. Text is not actually displayed until the function itself is 
  450. plotted to the grid. When a data file is loaded, the file name 
  451. acts as the primary text label. Remember that the primary label 
  452. for each function/data set represents the mathematical or file 
  453. name that will be parse when the plot function is called!
  454.  
  455.  
  456. Display/ Color Map
  457.  
  458.     A color requestor for the screen pallette.
  459.  
  460.  
  461.  
  462.  
  463. PenColors -
  464.  
  465.  
  466.  
  467.     There is a file include called 'PenColors', that APlot 2D 
  468. loads on startup. This is a text file that can be altered with an 
  469. editor giving the user flexibility to configure colors any way 
  470. he/she wishes. This can be very useful(I wish all programs 
  471. included such a file) for example if you want a different 
  472. arrangement when printing a screen dump. This is not the same as 
  473. adjusting the pallette.
  474.  
  475. The file contains:
  476.  
  477. 1   SDP         /* Screen Detail Pen */                                  
  478. 0   SBP         /* Screen Back Pen   */                                  
  479. 1   WDP         /* Window Detail Pen */                                  
  480. 0   WBP         /* Window Back Pen   */                                  
  481. 1   WINDTEXT    /* Pen for all text placed in window */       
  482. 7   WINDBACK    /* Backgroud pen for windows */ 
  483. 4   PLOTBACK    /* Backgroud pen for main plot window */ 
  484. 5   AXISCOLOR   /* pen for drawing axes */                               
  485. 5   GRIDCOLOR   /* pen for drawing Grid */        
  486. 1   FCOLOR      /* pen for f(x) */
  487. 7   GCOLOR      /* pen for g(x) */
  488. 6   HCOLOR      /* pen for h(x) */
  489. 3   ICOLOR      /* pen for i(x) */
  490. 1   GADTEXT     /* pen for any text within a gadget */                   
  491. 7   GADBACK     /* pen for background color of gadget box */             
  492. 2   GADHIGH     /* pen for highlight color of gadget box */              
  493. 1   INTUI_FP    /* front pen for menu text */                            
  494. 0   INTUI_BP    /* back pen for menu text */                             
  495.  
  496.  
  497.  
  498. I hope you will help me to make APlot 2D everything you want it 
  499. to be.
  500.  
  501.  
  502.                     Sincerely
  503.                          Joe L. Martin 
  504.  
  505.